/******************************************************************************
*	cmMutex.h	Header file of CM Mutex Module
*
*	coypright (C) 2009 Ding Lixing
*
******************************************************************************/


#ifndef __CMCOND_INC__
#define __CMCOND_INC__

#ifdef __cplusplus
extern "C" {
#endif


struct cmCondData_typ {
    unsigned long   flag;
};
typedef struct cmCondData_typ cmCONDDATA;

struct cmCond_typ {
    cmOBJ           obj;
    cmCONDDATA      data;
};
typedef struct cmCond_typ cmCOND;

extern int cmCondInit(cmCOND *cond, unsigned int opt, unsigned long flag);
extern int cmCondClr(cmCOND *cond, unsigned long flag);
extern int cmCondSet(cmCOND *cond, unsigned long flag);
extern int cmCondWaitAny(cmCOND *cond, unsigned long flag, unsigned int tout);
extern int cmCondWaitAll(cmCOND *cond, unsigned long flag, unsigned int tout);
extern int cmCondWaitAnyClean(cmCOND *cond, unsigned long flag, unsigned int tout);
extern int cmCondWaitAllClean(cmCOND *cond, unsigned long flag, unsigned int tout);

#ifdef __cplusplus
}
#endif

#endif /* __CMCOND_INC__ */


